package com.xiewz.comfig;

import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class MyConfig {

    @Bean(name = "iService") // 将返回值对象作为组件添加到容器中、表示id默认是方法名--myService 也可以指定name=""
    public MyService myService(){
        return new MyService();
    }
}
